﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RBOSS.Business.AdminModule;

namespace RBOSS.WebUI
{
    public partial class Settings : System.Web.UI.Page
    {
        private Configration con;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsCallback)
            {
                con = new Configration();
                Configration c = con.getConfigration();
                txtMaxCreditCard.Text = c.MaxCreditCard.ToString();
                txtPercentage.Text = c.Percentage.ToString();

            }
        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
            if (txtPercentage.Text != null)
            {
                con.AddSetting(int.Parse(txtMaxCreditCard.Text), int.Parse(txtPercentage.Text));
            }

        }
    }
}